MACD Liquidity Tracker Strategy [Quant Trading]MACD Liquidity Tracker Strategy
Overview
The MACD Liquidity Tracker Strategy is an enhanced trading system that transforms the traditional MACD indicator into a comprehensive momentum-based strategy with advanced visual signals and risk management. This strategy builds upon the original MACD Liquidity Tracker System indicator by TheNeWSystemLqtyTrckr , converting it into a fully automated trading strategy with improved parameters and additional features.
What Makes This Strategy Original
This strategy significantly enhances the basic MACD approach by introducing:
Four distinct system types for different market conditions and trading styles
Advanced color-coded histogram visualization with four dynamic colors showing momentum strength and direction
Integrated trend filtering using 9 different moving average types
Comprehensive risk management with customizable stop-loss and take-profit levels
Multiple alert systems for entry signals, exits, and trend conditions
Flexible signal display options with customizable entry markers
How It Works
Core MACD Calculation
The strategy uses a fully customizable MACD configuration with traditional default parameters:
Fast MA : 12 periods (customizable, minimum 1, no maximum limit)
Slow MA : 26 periods (customizable, minimum 1, no maximum limit)
Signal Line : 9 periods (customizable, now properly implemented and used)
Cryptocurrency Optimization : The strategy's flexible parameter system allows for significant optimization across different crypto assets. Traditional MACD settings (12/26/9) often generate excessive noise and false signals in volatile crypto markets. By using slower, more smoothed parameters, traders can capture meaningful momentum shifts while filtering out market noise.
Example - DOGE Optimization (45/80/290 settings) :
โข Performance : Optimized parameters yielding exceptional backtesting results with 29,800% PnL
โข Why it works : DOGE's high volatility and social sentiment-driven price action benefits from heavily smoothed indicators
โข Timeframes : Particularly effective on 30-minute and 4-hour charts for swing trading
โข Logic : The very slow parameters filter out noise and capture only the most significant trend changes
Other Optimizable Cryptocurrencies : This parameter flexibility makes the strategy highly effective for major altcoins including SUI, SEI, LINK, Solana (SOL) , and many others. Each crypto asset can benefit from custom parameter tuning based on its unique volatility profile and trading characteristics.
Four Trading System Types
1. Normal System (Default)
Long signals : When MACD line is above the signal line
Short signals : When MACD line is below the signal line
Best for : Swing trading and capturing longer-term trends in stable markets
Logic : Traditional MACD crossover approach using the signal line
2. Fast System
Long signals : Bright Blue OR Dark Magenta (transparent) histogram colors
Short signals : Dark Blue (transparent) OR Bright Magenta histogram colors
Best for : Scalping and high-volatility markets (crypto, forex)
Logic : Leverages early momentum shifts based on histogram color changes
3. Safe System
Long signals : Only Bright Blue histogram color (strongest bullish momentum)
Short signals : All other colors (Dark Blue, Bright Magenta, Dark Magenta)
Best for : Risk-averse traders and choppy markets
Logic : Prioritizes only the strongest bullish signals while treating everything else as bearish
4. Crossover System
Long signals : MACD line crosses above signal line
Short signals : MACD line crosses below signal line
Best for : Precise timing entries with traditional MACD methodology
Logic : Pure crossover signals for more precise entry timing
Color-Coded Histogram Logic
The strategy uses four distinct colors to visualize momentum:
๐น Bright Blue : MACD > 0 and rising (strong bullish momentum)
๐น Dark Blue (Transparent) : MACD > 0 but falling (weakening bullish momentum)
๐น Bright Magenta : MACD < 0 and falling (strong bearish momentum)
๐น Dark Magenta (Transparent) : MACD < 0 but rising (weakening bearish momentum)
Trend Filter Integration
The strategy includes an advanced trend filter using 9 different moving average types:
SMA (Simple Moving Average)
EMA (Exponential Moving Average) - Default
WMA (Weighted Moving Average)
HMA (Hull Moving Average)
RMA (Running Moving Average)
LSMA (Least Squares Moving Average)
DEMA (Double Exponential Moving Average)
TEMA (Triple Exponential Moving Average)
VIDYA (Variable Index Dynamic Average)
Default Settings : 50-period EMA for trend identification
Visual Signal System
Entry Markers : Blue triangles (โฒ) below candles for long entries, Magenta triangles (โผ) above candles for short entries
Candle Coloring : Price candles change color based on active signals (Blue = Long, Magenta = Short)
Signal Text : Optional "Long" or "Short" text inside entry triangles (toggleable)
Trend MA : Gray line plotted on main chart for trend reference
Parameter Optimization Examples
DOGE Trading Success (Optimized Parameters) :
Using 45/80/290 MACD settings with 50-period EMA trend filter has shown exceptional results on DOGE:
Performance : Backtesting results showing 29,800% PnL demonstrate the power of proper parameter optimization
Reasoning : DOGE's meme-driven volatility and social sentiment spikes create significant noise with traditional MACD settings
Solution : Very slow parameters (45/80/290) filter out social media-driven price spikes while capturing only major momentum shifts
Optimal Timeframes : 30-minute and 4-hour charts for swing trading opportunities
Result : Exceptionally clean signals with minimal false entries during DOGE's characteristic pump-and-dump cycles
Multi-Crypto Adaptability :
The same optimization principles apply to other major cryptocurrencies:
SUI : Benefits from smoothed parameters due to newer coin volatility patterns
SEI : Requires adjustment for its unique DeFi-related price movements
LINK : Oracle news events create price spikes that benefit from noise filtering
Solana (SOL) : Network congestion events and ecosystem developments need smoothed detection
General Rule : Higher volatility coins typically benefit from very slow MACD parameters (40-50 / 70-90 / 250-300 ranges)
Key Input Parameters
System Type : Choose between Fast, Normal, Safe, or Crossover (Default: Normal)
MACD Fast MA : 12 periods default (no maximum limit, consider 40-50 for crypto optimization)
MACD Slow MA : 26 periods default (no maximum limit, consider 70-90 for crypto optimization)
MACD Signal MA : 9 periods default (now properly utilized, consider 250-300 for crypto optimization)
Trend MA Type : EMA default (9 options available)
Trend MA Length : 50 periods default (no maximum limit)
Signal Display : Both, Long Only, Short Only, or None
Show Signal Text : True/False toggle for entry marker text
Trading Applications
Recommended Use Cases
Momentum Trading : Capitalize on strong directional moves using the color-coded system
Trend Following : Combine MACD signals with trend MA filter for higher probability trades
Scalping : Use "Fast" system type for quick entries in volatile markets
Swing Trading : Use "Normal" or "Safe" system types for longer-term positions
Cryptocurrency Trading : Optimize parameters for individual crypto assets (e.g., 45/80/290 for DOGE, custom settings for SUI, SEI, LINK, SOL)
Market Suitability
Volatile Markets : Forex, crypto, indices (recommend "Fast" system or smoothed parameters)
Stable Markets : Stocks, ETFs (recommend "Normal" or "Safe" system)
All Timeframes : Effective from 1-minute charts to daily charts
Crypto Optimization : Each major cryptocurrency (DOGE, SUI, SEI, LINK, SOL, etc.) can benefit from custom parameter tuning. Consider slower MACD parameters for noise reduction in volatile crypto markets
Alert System
The strategy provides comprehensive alerts for:
Entry Signals : Long and short entry triangle appearances
Exit Signals : Position exit notifications
Color Changes : Individual histogram color alerts
Trend Conditions : Price above/below trend MA alerts
Strategy Parameters
Default Settings
Initial Capital : $1,000
Position Size : 100% of equity
Commission : 0.1%
Slippage : 3 points
Date Range : January 1, 2018 to December 31, 2069
Risk Management (Optional)
Stop Loss : Disabled by default (customizable percentage-based)
Take Profit : Disabled by default (customizable percentage-based)
Short Trades : Disabled by default (can be enabled)
Important Notes and Limitations
Backtesting Considerations
Uses realistic commission (0.1%) and slippage (3 points)
Default position sizing uses 100% equity - adjust based on risk tolerance
Stop-loss and take-profit are disabled by default to show raw strategy performance
Strategy does not use lookahead bias or future data
Risk Warnings
Past performance does not guarantee future results
MACD-based strategies may produce false signals in ranging markets
Consider combining with additional confluences like support/resistance levels
Test thoroughly on demo accounts before live trading
Adjust position sizing based on your risk management requirements
Technical Limitations
Strategy does not work on non-standard chart types (Heikin Ashi, Renko, etc.)
Signals are based on close prices and may not reflect intraday price action
Multiple rapid signals in volatile conditions may result in overtrading
Credits and Attribution
This strategy is based on the original "MACD Liquidity Tracker System" indicator created by TheNeWSystemLqtyTrckr . This strategy version includes significant enhancements:
Complete strategy implementation with entry/exit logic
Addition of the "Crossover" system type
Proper implementation and utilization of the MACD signal line
Enhanced risk management features
Improved parameter flexibility with no artificial maximum limits
Additional alert systems for comprehensive trade management
The original indicator's core color logic and visual system have been preserved while expanding functionality for automated trading applications.
Cari dalam skrip untuk "take profit"
LANZ Strategy 5.0 [Backtest]๐ท LANZ Strategy 5.0 โ Rule-Based BUY Logic with Time Filter, Session Limits and Auto SL/TP Execution
This is the backtest version of LANZ Strategy 5.0, built as a strategy script to evaluate real performance under fixed intraday conditions. It automatically places BUY and SELL trades based on structured candle confirmation, EMA trend alignment, and session-based filters. The system simulates real-time execution with precise Stop Loss and Take Profit levels.
๐ Built for traders seeking to simulate clean intraday logic with fully automated entries and performance metrics.
๐ง Core Logic & Strategy Conditions
โ
BUY Signal Conditions:
Price is above the EMA200
The last 3 candles are bullish (close > open)
The signal occurs within the defined session window (NY time)
Daily trade limit has not been exceeded
If all are true, a BUY order is executed at market, with SL and TP set immediately.
๐ป SELL Signal Conditions (Optional):
Exactly inverse to BUY (below EMA + 3 bearish candles). Disabled by default.
๐ Operational Time Filter (New York Time)
You can fully customize your intraday window:
Start Time: e.g., 01:15 NY
End Time: e.g., 16:00 NY
The system evaluates signals only within this range, even across midnight if configured.
๐ Trade Management System
One trade at a time per signal
Trades include a Stop Loss (SL) and Take Profit (TP) based on pip distance
Trade result is calculated automatically
Each signal is shown with a triangle marker (BUY only, by default)
๐งช Backtest Accuracy
This version uses:
strategy.order() for entries
strategy.exit() for SL and TP
strategy.close_all() at the configured manual closing time
This ensures realistic behavior in the TradingView strategy tester.
โ๏ธ Flow Summary (Step-by-Step)
On every bar, check:
Is the time within the operational session?
Is the price above the EMA?
Are the last 3 candles bullish?
If conditions met โ A BUY trade is opened:
SL = entry โ X pips
TP = entry + Y pips
Trade closes:
If SL or TP is hit
Or at the configured manual close time (e.g., 16:00 NY)
๐ Settings Overview
Timeframe: 1-hour (ideal)
SL/TP: Configurable in pips
Max trades/day: User-defined (default = 99 = unlimited)
Manual close: Adjustable by time
Entry type: Market (not limit)
Visuals: Plotshape triangle for BUY entry
๐จโ๐ป Credits:
๐ก Developed by: LANZ
๐ง Strategy logic & execution: LANZ
โ
Designed for: Clean backtesting, clarity in execution, and intraday logic simulation
Simple DCA Strategy----
### ๐ **Simple DCA Strategy with Backtest Date Filter**
This strategy implements a **Dollar-Cost Averaging (DCA)** approach for long positions, including:
* โ
**Base Order Entry:** Starts a position with a fixed dollar amount when no position is open.
* ๐ **Safety Orders:** Buys additional positions when the price drops by a defined percentage, increasing position size with each new entry using a multiplier.
* ๐ฏ **Take Profit Exit:** Closes all positions when the price reaches a profit target (in % above average entry).
* ๐๏ธ **Backtest Date Range:** Allows users to specify a custom start and optional end date to run the strategy only within that time window.
* ๐ **Plots:** Visualizes average entry, take profit level, and safety order trigger line.
#### โ๏ธ Customizable Inputs:
* Base Order Size (\$)
* Price Deviation for Safety Orders (%)
* Maximum Safety Orders
* Order Size Multiplier
* Take Profit Target (%)
* Start and End Dates for Backtesting
This is a **long-only strategy** and is best used for backtesting performance of DCA-style accumulation under different market conditions.
----
Bull Momentum GaugeBull Momentum Gauge
The Bull Momentum Gauge is a powerful momentum oscillator designed to identify the underlying strength and sustainability of major market trends. Instead of trying to predict tops and bottoms, this indicator helps traders and investors ride long-term bull markets by signaling when momentum is building and when it is starting to fade.
What it Does
At its core, this tool measures how statistically "stretched" or "compressed" an asset's price is relative to its long-term (1-year) trend. It does this by:
Calculating the price's deviation from its 365-day moving average.
Normalizing this deviation into a Z-score to measure its statistical significance.
Comparing the inverted Z-score to its own 200-day moving average to gauge the momentum of the trend itself.
The result is a single, smooth line that oscillates around a zero value.
How to Use It
The signals are simple and based on the indicator's relationship to the zero line:
Green Line (Gauge below 0): This indicates that the price has been compressed relative to its long-term trend and is now showing signs of building upward momentum. A cross into the green zone can be interpreted as a potential entry signal for a new bull run.
Red Line (Gauge above 0): This suggests that the price has become over-extended or "stretched" and the upward momentum is beginning to weaken. A cross into the red zone can be used as a potential exit signal, indicating it may be time to take profits and wait for the next cycle.
This indicator is designed to work across multiple timeframes (Daily, Weekly, Monthly) and provides a clear, data-driven framework for navigating major market cycles.
DP_ORB Entry & Exit IndicatorDisclaimer:
This indicator is for educational purposes only. It does not constitute financial advice. Always do your own research and manage your risk. Also, I cannot take full credit for 'ORB' as its a well known strategy amongst many traders, but I do need to give a special shout out to @TheBigDaddyMax for putting me on to this.
DP_ORB Entry & Exit Indicator
Description:
The DP_ORB Entry & Exit Indicator is a powerful tool designed for traders who utilize the Opening Range Breakout (ORB) strategy on the NYSE session. This indicator visually identifies the initial volatility window of the trading day, by marking the 15m High, and 15m Low into a ORB Box, & then tracks breakout opportunities, and provides clear, dynamic trade management levelsโall directly on your chart.
Key Features:
Automatic Opening Range (ORB) Box:
Identifies and plots the high and low of the user-defined opening range (default 9:30โ9:45 NYSE) for visual reference and strategy foundation.
Breakout Entry Signals:
Automatically detects and marks long or short breakout entries when price closes above or below the ORB range, with additional momentum confirmation.
Dynamic Stop Loss:
Stop loss is intelligently set to the previous barโs low for long trades (or high for shorts), adapting to market structure at entry.
Take Profit Targets:
Up to three fully adjustable take-profit levels are plotted, calculated as percentages from entry, supporting progressive trade management.
Visual Trade Management:
Entry, stop loss, and take profit levels are displayed as extending dashed lines from entry point to the current bar, with labels always shown just to the right of price for clarity on all timeframes.
Automatic Reset and Cleanup:
Visuals and logic reset daily and upon exit, ensuring a clean, uncluttered chart experience.
How to Use:
Set your preferred opening range time and take profit levels in the settings.
Wait for a breakout and confirmation during the NYSE session.
Use the on-chart lines and labels to manage your trade according to your risk and strategy plan.
Best For:
Day traders and scalpers seeking a disciplined, visual, and fully-automated approach to opening range breakout trading.
Gold Power Hours Strategy๐ Gold Power Hours Trading Strategy
Trade XAUUSD (Gold) or XAUEUR during the most volatile hours of the New York session, using momentum and trend confirmation, with session-specific risk/reward profiles.
โ
Strategy Rules
๐ Valid Trading Times ("Power Hours"):
Trades are only taken during high-probability time windows on Tuesdays, Wednesdays, and Thursdays , corresponding to key New York session activity:
Morning Session:
08:00 โ 11:00 (NY time)
Afternoon Session:
12:30 โ 16:00
19:00 โ 22:00
These times align with institutional activity and economic news releases.
๐ Technical Indicators Used:
50-period Simple Moving Average (SMA50):
Identifies the dominant market trend.
14-period Relative Strength Index (RSI):
Measures market momentum with session-adjusted thresholds.
๐ฉ Buy Signal Criteria:
Price is above the 50-period SMA (bullish trend)
RSI is greater than:
60 during Morning Session
55 during Afternoon Session
Must be during a valid day (TueโThu) and Power Hour session
๐ฅ Sell Signal Criteria:
Price is below the 50-period SMA (bearish trend)
RSI is less than:
40 during Morning Session
45 during Afternoon Session
Must be during a valid day and Power Hour session
๐ฏ Trade Management Rules:
Morning Session (08:00โ11:00)
Stop Loss (SL): 50 pips
Take Profit (TP): 150 pips
RiskโReward Ratio: 1:3
Afternoon Session (12:30โ16:00 & 19:00โ22:00)
Stop Loss (SL): 50 pips
Take Profit (TP): up to 100 pips
RiskโReward Ratio: up to 1:2
โ ๏ธ TP is slightly reduced in the afternoon due to typically lower volatility compared to the morning session.
๐บ Visuals & Alerts:
Buy signals: Green triangle plotted below the bar
Sell signals: Red triangle plotted above the bar
SMA50 line: Orange
Valid session background: Light pink
Alerts: Automatic alerts for buy/sell signals
MA Crossover Strategy with TP/SL (5 EMA Filter)How the Strategy Works on a 5-Minute Chart:
Data Input (5-Minute Candles):
Every single data point (candle) on your chart will represent 5 minutes of price action (Open, High, Low, Close for that 5-minute period).
All calculations (MAs, EMA, signals) will be based on these 5-minute price data points.
Moving Average Calculations:
Fast MA (10-period SMA): This will be the Simple Moving Average of the closing prices of the last 10 five-minute candles. It reacts relatively quickly to recent price changes.
Slow MA (30-period SMA): This will be the Simple Moving Average of the closing prices of the last 30 five-minute candles. It represents a slightly longer-term trend compared to the Fast MA.
5 EMA (5-period EMA): This is the Exponential Moving Average of the closing prices of the last 5 five-minute candles. Being an EMA, it gives more weight to the most recent 5-minute prices, making it very responsive to immediate price action.
Signal Generation (Entry Conditions):
Long Entry Signal:
The 10-period SMA crosses above the 30-period SMA (indicating a potential bullish shift in the short-to-medium term trend).
AND the current 5-minute candle's closing price is above the 5-period EMA (confirming that the immediate price momentum is also bullish and supporting the crossover).
If both conditions are met at the close of a 5-minute candle, a "Buy" signal is generated.
Short Entry Signal:
The 10-period SMA crosses below the 30-period SMA (indicating a potential bearish shift).
AND the current 5-minute candle's closing price is below the 5-period EMA (confirming immediate bearish momentum).
If both conditions are met at the close of a 5-minute candle, a "Sell" signal is generated.
Trade Execution:
When a signal is triggered, the strategy enters a trade (long or short) at the closing price of that 5-minute candle.
Immediately upon entry, it places two contingent orders:
Take Profit (Target): Set at 2% (by default) away from your entry price. For a long trade, it's 2% above; for a short trade, 2% below.
Stop Loss: Set at 1% (by default) away from your entry price. For a long trade, it's 1% below; for a short trade, 1% above.
The trade will remain open until either the Take Profit or Stop Loss price is hit by subsequent 5-minute candles.
Implications for Trading on a 5-Minute Chart:
Increased Trade Frequency: You will likely see many more signals and trades compared to higher timeframes (like 1-hour or daily charts). This means more potential opportunities but also more transaction costs (commissions, slippage).
Sensitivity to Noise: Lower timeframes are more prone to "market noise" โ small, random price fluctuations that don't indicate a true trend. While the 5 EMA filter helps, some false signals might still occur.
Faster Price Action: Price movements can be very rapid on a 5-minute chart. Your take profit or stop loss levels might be hit very quickly, sometimes within the same or next few candles.
Parameter Optimization is Crucial: The default MA lengths (10, 30) and EMA (5) might not be optimal for every asset or market condition on a 5-minute chart. You'll need to backtest extensively and potentially adjust these lengths, as well as the targetPerc and stopPerc, to find what works best for the specific instrument you're trading.
Risk Management: The fixed percentage stop loss is vital on a 5-minute chart due to its volatility. Without it, a few unfavorable moves could lead to significant losses.
True Breakout Pattern [TradingFinder] Breakout Signal Indicator๐ต Introduction
In many market conditions, what initially appears to be a decisive breakout often turns out to be nothing more than a false breakout or fake breakout. Price breaks through a key swing level or an important support and resistance zone, only to quickly return to its previous range.
These failed breakouts, which are often the result of liquidity traps or market manipulation, serve more as a warning sign of structural weakness than confirmation of a new trend.
This indicator is designed around the concept of the fake breakout.
The logic is simple but precise : when price breaks a swing level and returns to that level within a maximum of five candles, the move is considered a false breakout. At this point, a Fibonacci retracement is applied to the recent price swing to evaluate the pullback area.
If price, within ten candles after the return to the breakout level, enters the Fibonacci zone between 0.618 and 1.0, the setup becomes valid for a potential entry. This area is identified as a long entry zone, with the stop loss placed just beyond the 1.0 level and the take profit defined based on the desired risk-to-reward ratio.
By combining accurate detection of false breakouts, analysis of price reaction to swing levels, and alignment with Fibonacci retracement logic, this framework allows traders to identify opportunities often missed by others. In a market where failed breakouts are a common and recurring phenomenon, this indicator aims to transform these traps into measurable trading opportunities.
Long Setup :
Short Setup :
๐ต How to Use
This indicator operates based on the recognition of false breakouts from structural levels in the market, specifically swing levels, and combines that with Fibonacci retracement analysis.
In this strategy, trades are only considered when price returns to the broken level within a defined time window and reacts appropriately inside a predefined Fibonacci range. Depending on the direction of the initial breakout, the system outlines two scenarios for long and short setups.
๐ฃ Long Setup
In the long setup, price initially breaks below a support level or swing low. If the price returns to the broken level within a maximum of five candles, the move is identified as a fake breakout.
At this stage, a Fibonacci retracement is drawn from the recent high to the low. If price, within ten candles of returning to the level, moves into the 0.618 to 1.0 Fibonacci zone, the conditions for a long entry are met.
The stop loss is placed slightly below the 1.0 level, while the take profit is set based on the traderโs preferred risk-reward ratio. This setup aims to capture deeply discounted entries at low risk, aligned with smart money reversals.
๐ฃ Short Setup
In the short setup, the price breaks above a resistance level or swing high. If the price returns to that level within five candles, the move is again treated as a false breakout. Fibonacci is then drawn from the recent low to the high to observe the retracement area.
Should price enter the 0.618 to 1.0 Fibonacci range within ten candles of returning, a short entry is considered valid. In this case, the stop loss is placed just above the 1.0 level, and the take profit is adjusted based on the intended risk-reward target. This method allows traders to identify high-probability short setups by focusing on failed breakouts and deep pullbacks.
๐ต Settings
๐ฃ Logical settings
Swing period : You can set the swing detection period.
Valid After Trigger Bars : Limits how many candles after a fake breakout the entry zone remains valid.
Max Swing Back Method : It is in two modes "All" and "Custom". If it is in "All" mode, it will check all swings, and if it is in "Custom" mode, it will check the swings to the extent you determine.
Max Swing Back : You can set the number of swings that will go back for checking.
๐ฃ Display settings
Displaying or not displaying swings and setting the color of labels and lines.
๐ฃ Alert Settings
Alert False Breakout : Enables alerts for Breakout.
Message Frequency : Determines the frequency of alerts. Options include 'All' (every function call), 'Once Per Bar' (first call within the bar), and 'Once Per Bar Close' (final script execution of the real-time bar). Default is 'Once per Bar'.
Show Alert Time by Time Zone : Configures the time zone for alert messages. Default is 'UTC'.
๐ต Conclusion
A sound understanding of the false breakout phenomenon and its relationship to structural price behavior is essential for technical traders aiming to improve precision and consistency. Many poor trading decisions stem from misinterpreting failed breakouts and entering too early into weak signals.
A structured approach, grounded in the analysis of swing levels and validated through specific price action and timing rules, can turn these misleading moves into valuable trade opportunities.
This indicator, by combining fake breakout detection with time filters and Fibonacci-based retracement zones, helps traders only engage with the market when multiple confirming factors are in alignment. The result is a strategy that emphasizes probability, risk control, and clarity in decision-making, offering a solid edge in navigating todayโs volatile markets.
Random Coin Toss Strategy๐ Overview
This strategy is a probability-based trading simulation that randomly decides trade direction using a coin-toss mechanism and executes trades with a customizable risk-reward ratio. It's designed primarily for testing entry frequency and risk dynamics, not predictive accuracy.
๐ฏ Core Concept
Every N bars (configurable), the strategy performs a pseudo-random coin toss.
Based on the result:
If heads โ Buy
If tails โ Sell
Once a position is opened, it sets a Stop-Loss (SL) and Take-Profit (TP) based on a multiple of the current ATR (Average True Range) value.
โ๏ธ Configurable Inputs
ATR Length Period for ATR calculation, determines volatility basis.
SL Multiplier SL distance = ATR ร multiplier (e.g., 1.0 means 1x ATR) .
TP Multiplier TP distance = ATR ร multiplier (e.g., 2.0 = 2x ATR) .
Entry Frequency Bars to wait between each new coin toss decision.
Show TP/SL Zones Toggle on/off for drawing visual TP and SL zones.
Box Size Number of bars used to define the width of the TP/SL boxes.
๐ Entry & Exit Logic
Entry:
Happens only when no current position exists and it's the correct bar interval.
Entry direction is randomly decided.
Exit:
Positions exit at either:
Take-Profit (TP) level
Stop-Loss (SL) level
Both are calculated using the configured ATR-based distances.
๐ผ๏ธ Visual Features
TP and SL zones:
Rendered as shaded rectangles (boxes) only once per trade.
Green box for TP zone, red box for SL zone.
Automatically deleted and redrawn for each new trade to avoid chart clutter.
ATR Display Table:
A minimal info table at the top-right shows the current ATR value.
Updates every few bars for performance.
๐งช Use Cases
Ideal for risk-reward modeling, strategy prototyping, and understanding how volatility-based SL/TP behavior affects results.
Great for backtesting frequency, RR tweaks (e.g., 2:5 or 3:1), and execution structure in random conditions.
โ ๏ธ Disclaimer
Since the trade direction is random, this script is not meant for predictive trading but serves as a powerful experiment framework for studying how SL, TP, and volatility interact with random chance in a controlled, repeatable system.
15-Min ORB Indicator with Breakout Targets **What this indicator does:**
The 15-Min ORB (Opening Range Breakout) Indicator helps traders spot breakout trades by automatically detecting the high and low of the first 15 minutes after a session opens. It then monitors for breakouts above or below this range and plots dynamic take-profit levels based on your chosen multipliers.
**How it works:**
You set the start time for your session (hour and minute) in the settings.
The indicator marks the high and low during the first 15 minutes after your chosen open time, drawing lines on the chart and, if enabled, labels for these levels.
If price breaks above the 15-min high, a potential long breakout is identified; if it breaks below the low, a potential short breakout is detected.
Upon a breakout, the script calculates the distance from the entry (breakout) to the opposite side of the 15-min range and uses your input multipliers to project two take-profit levels (TP1/TP2).
All lines and labels (for the range and targets) can be individually toggled on or off in the settings.
Both the 15-min range and the targets can be styled (color, line style, label position).
**How to use it:**
Add the indicator to your chart.
Set the session start hour and minute to match your instrumentโs open (e.g., 9:30 for US stocks or futures).
Use the settings to customize which levels and labels are shown, their appearance, and the target expansion multiples.
When price breaks out above or below the opening range, the script will plot TP1 and TP2 lines at your chosen risk/reward multiples, and label them if desired.
You can use the visual levels for trade entries, profit taking, or alerts.
**What makes it unique and useful:** >
Unlike many basic ORB indicators, this script not only marks the opening range but also tracks breakouts, auto-plots your profit targets based on range expansion, and gives you full control over display (styles, toggles, and label positions).
The TP targets are dynamic and can be set to any multiples, adapting to your risk/reward plan and breakout style.
Everything is customizable for your own session times, instrument, or trading approach.
**Typical uses:**
Intraday traders looking for clear breakout setups around the session open.
Automated R-multiple target planning for both long and short trades.
Visualizing volatility and measuring early price expansion.
Warrior Trading Momentum Strategy
# ๐ Warrior Trading Momentum Strategy - Day Trading Excellence
## Strategy Overview
This comprehensive Pine Script strategy replicates the proven methodologies taught by Ross Cameron and the Warrior Trading community. Designed for active day traders, it identifies high-probability momentum setups with strict risk management protocols.
## ๐ Core Trading Setups
### 1. Gap and Go Trading
- **Primary Focus**: Stocks gapping up 2%+ with volume confirmation
- **Entry Logic**: Breakout above gap open with momentum validation
- **Volume Filter**: 2x average volume requirement for quality setups
### 2. ABCD Pattern Recognition
- **Pattern Detection**: Automated identification of classic ABCD reversal patterns
- **Validation**: A-B and C-D move relationship analysis
- **Entry Trigger**: D-point breakout with volume confirmation
### 3. VWAP Momentum Plays
- **Strategy**: Entries near VWAP with bounce confirmation
- **Distance Filter**: Configurable percentage distance for optimal entries
- **Direction Bias**: Above VWAP bullish momentum validation
### 4. Red to Green Reversals
- **Setup**: Reversal patterns after consecutive red candles
- **Confirmation**: Volume spike with bullish close required
- **Momentum**: Trend change validation with RSI support
### 5. Breakout Momentum
- **Logic**: Breakouts above recent highs with volume
- **Filters**: EMA20 and RSI confirmation for quality
- **Trend**: Established momentum direction validation
## โก Key Features
### Smart Risk Management
- **Position Sizing**: Automatic calculation based on account risk percentage
- **Stop Loss**: 2 ATR-based stops for volatility adjustment
- **Take Profit**: Configurable risk-reward ratios (default 1:2)
- **Trailing Stops**: Profit protection with adjustable triggers
### Advanced Filtering System
- **Time Filters**: Market hours trading with lunch hour avoidance
- **Volume Confirmation**: Multi-timeframe volume analysis
- **Momentum Indicators**: RSI and moving average trend validation
- **Quality Control**: Multiple confirmation layers for signal accuracy
### PDT-Friendly Design
- **Trade Limiting**: Built-in daily trade counter for accounts under $25K
- **Selective Trading**: Priority scoring system for A+ setups only
- **Quality over Quantity**: Maximum 2-3 high-probability trades per day
## ๐ฏ Optimal Usage
### Best Timeframes
- **Primary**: 5-minute charts for entry timing
- **Secondary**: 1-minute for precise execution
- **Context**: Daily charts for gap analysis
### Ideal Market Conditions
- **Volatility**: High-volume, momentum-driven markets
- **Stocks**: Market cap $100M+, average volume 1M+ shares
- **Sectors**: Technology, biotech, growth stocks with news catalysts
### Account Requirements
- **Minimum**: $500+ for proper position sizing
- **Recommended**: $25K+ for unlimited day trading
- **Risk Tolerance**: Active day trading experience preferred
## ๐ Performance Optimization
### Entry Criteria (All Must Align)
1. โ
Time filter (market hours, avoid lunch)
2. โ
Volume spike (2x+ average volume)
3. โ
Momentum confirmation (RSI 50-80)
4. โ
Trend alignment (above EMA20)
5. โ
Pattern completion (setup-specific)
### Risk Parameters
- **Maximum Risk**: 1-2% per trade
- **Position Size**: 25% of account maximum
- **Stop Loss**: 2 ATR below entry
- **Take Profit**: 2:1 risk-reward minimum
## ๐ง Customization Options
### Gap Trading Settings
- Minimum gap percentage threshold
- Volume multiplier requirements
- Gap validation criteria
### Pattern Recognition
- ABCD ratio parameters
- Swing point sensitivity
- Pattern completion filters
### Risk Management
- Risk-reward ratio adjustment
- Maximum daily trade limits
- Trailing stop trigger levels
### Time and Session Filters
- Trading session customization
- Lunch hour avoidance toggle
- Market condition filters
## โ ๏ธ Important Disclaimers
### Risk Warning
- **High Risk**: Day trading involves substantial risk of loss
- **Capital Requirements**: Only trade with risk capital
- **Experience**: Strategy requires active monitoring and experience
- **Market Conditions**: Performance varies with market volatility
### PDT Considerations
- **Day Trading Rules**: Accounts under $25K limited to 3 day trades per 5 days
- **Compliance**: Strategy includes trade counting for PDT compliance
- **Alternative**: Consider swing trading modifications for smaller accounts
### Backtesting vs Live Trading
- **Slippage**: Real trading involves execution delays and slippage
- **Commissions**: Factor in broker fees for accurate performance
- **Market Impact**: Large positions may affect fill prices
- **Psychological Factors**: Live trading involves emotional challenges
## ๐ Educational Value
This strategy serves as an excellent learning tool for understanding:
- Professional day trading methodologies
- Risk management principles
- Pattern recognition techniques
- Volume and momentum analysis
- Multi-timeframe analysis
## ๐ค Community and Support
Based on proven Warrior Trading methodologies with active community support. Strategy includes comprehensive plotting and information tables for educational purposes and trade analysis.
---
**Disclaimer**: This strategy is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management and never risk more than you can afford to lose.
**Tags**: #DayTrading #Momentum #WarriorTrading #GapAndGo #ABCD #VWAP #PatternTrading #RiskManagement
Volume Overbought/Oversold Zones๐ What Youโll See on the Chart
Red Background or Red Triangle ABOVE a Candle
๐บ Means: Overbought Volume
โ Volume on that bar is much higher than average (as defined by your settings).
โ Suggests strong activity, possible exhaustion in the trend or an emotional spike.
โ Itโs a warning: consider watching for signs of reversal, especially if price is already stretched.
Green Background or Green Triangle BELOW a Candle
๐ป Means: Oversold Volume
โ Volume on that bar is much lower than normal.
โ Suggests the market may be losing momentum, or few sellers are left.
โ Could signal an upcoming reversal or recovery if confirmed by price action.
Orange Line Below the Candles (Volume Moving Average)
๐ Shows the "normal" average volume over the last X candles (default is 20).
โ Helps you visually compare each barโs volume to the average.
Gray Columns (Actual Volume Bars)
๐ These are your regular volume bars โ they rise and fall based on how active each candle is.
๐ What This Indicator Does (In Simple Words)
This indicator looks at trading volumeโwhich is how many shares/contracts were traded in a given periodโand compares it to what's considered "normal" for recent history. When volume is unusually high or low, it highlights those moments on the chart.
It tells you:
โข When volume is much higher than normal โ market might be overheated or experiencing a buying/selling frenzy.
โข When volume is much lower than normal โ market might be quiet, potentially indicating lack of interest or indecision.
These conditions are marked visually, so you can instantly spot them.
๐ก How It Helps You As a Trader
1. Spotting Exhaustion in Trends (Overbought Signals)
If a market is going up and suddenly volume spikes way above normal, it may mean:
โข The move is getting crowded (lots of buyers are already in).
โข A reversal or pullback could be near because smart money may be taking profits.
Trading idea: Wait for high-volume up bars, then look for price weakness to consider a short or exit.
2. Identifying Hidden Opportunities (Oversold Signals)
If price is falling but volume drops unusually low, it might mean:
โข Panic is fading.
โข Sellers are losing energy.
โข A bounce or trend reversal could happen soon.
Trading idea: After a volume drop in a downtrend, watch for bullish price patterns or momentum shifts to consider a buy.
3. Confirming or Doubting Breakouts
Volume is critical for confirming breakouts:
โข If price breaks a key level with strong volume, it's more likely to continue.
โข A breakout without volume could be a fake-out.
This indicator highlights volume surges that can help you confirm such moves.
๐ How to Use It in Practice
โข Combine it with candlestick patterns, support/resistance, or momentum indicators.
โข Use the background colors or shapes as a visual cue to pause and analyze.
โข Adjust the sensitivity to suit fast-moving markets (like crypto) or slow ones (like large-cap stocks).
Simple Risk-to-Reward (R) Indicator (TP1โTP2)What this indicator does:
This tool helps traders clearly visualize their risk and reward on any trade by plotting their entry, stop loss, and take-profit (TP) levels directly on the chart. Itโs designed to make manual trade planning more visual and systematic.
How it works:
You set your planned entry price, whether you want to plot a Long or Short setup, and your stop-loss distance (in ticks).
The indicator calculates your stop-loss level and automatically plots it on the chart.
It then draws take-profit levels at 1R and 2R (where โRโ is your risk, the distance between entry and stop).
You can toggle the TP1 and TP2 lines on or off to suit your preference.
How to use it:
Open the settings and enter your intended entry price.
Select โLong Setupโ for a buy trade, or turn it off for a sell/short trade.
Enter your desired stop loss in ticks.
Choose which take-profit levels to display by toggling TP1 and TP2.
The indicator will show entry, stop, and take-profit levels right on your chart so you can easily see your planned risk/reward.
What makes it unique and useful:
This indicator is designed for manual trade planning, giving you full control over your inputs and letting you instantly see your risk/reward on any instrument or timeframe. Unlike some built-in tools, it supports both long and short trades, lets you set all levels manually, and keeps your charts clean and easy to interpret.
Multi-Position DashMulti-Position Dash โ Risk Dashboard for Forex, Stocks & Indices
Overview:
The Multi-Position Dash is a highly customizable trading dashboard designed to help active traders manage up to 8 simultaneous positions across Forex, Stocks, and Indices. Whether you're trading single entries, layering positions, using DCA (Dollar Cost Averaging), or running complex hedging setups, this tool provides essential, real-time risk and P&L insightsโdirectly on your chart.
Key Features:
โ๏ธ Supports Forex, Stocks, Indices โ with automatic pip and contract conversions
โ๏ธ Track up to 8 manual positions, each with customizable direction, lot size or contracts, entry price, Take Profit, and Stop Loss
โ๏ธ Full GBP-based P&L and risk calculation, including automatic USD-to-GBP conversion for non-FX assets
โ๏ธ Real-time display of:
Total potential Take Profit (GBP)
Total potential Stop Loss (GBP)
Risk % relative to account balance
Live P&L (GBP) based on current price
โ๏ธ Breakeven price calculation, even across mixed-direction positions (DCA & hedging aware)
โ๏ธ Visual breakeven line, live P&L arrows, and entry price markers
โ๏ธ Shared Stop Loss option for all positions โ perfect for DCA traders
โ๏ธ Easy export strings for logging trades to external tools like spreadsheets
Ideal For:
โ
Forex traders using lot-based risk models
โ
Stock & Index traders wanting simplified contract-based position tracking
โ
Traders managing multiple active positions, with or without hedging
โ
Anyone needing at-a-glance P&L and risk monitoring, independent of broker platforms
Notes & Usage:
This is a manual tracking toolโyou enter your positions, TP, SL levels, etc., and the dashboard calculates the rest. It does not place or manage live orders.
Supports both Long and Short positions.
All calculations are based on your inputs and market priceโaccuracy depends on maintaining your inputs properly.
Shared Stop Loss feature applies a single, unified stop across all active positions for simplified risk control in DCA setups.
GBP is used as the account currencyโUSD-to-GBP conversion is applied to stocks and indices as needed.
Disclaimer:
This tool is for educational and planning purposes only. It does not place or manage live trades, and is not a substitute for broker risk management tools. Always double-check your own position sizing and risk before placing live orders.
Position Size Calculator v206/17/2025 - Updated to add MGC to list of instruments
Position Size Calculator for Futures Trading
A professional position sizing tool designed specifically for futures traders who want to maintain disciplined risk management. This indicator calculates the optimal number of contracts based on your predefined risk amount and provides instant visual feedback.
Key Features:
โข Interactive price selection - simply click on the chart to set entry, stop loss, and take profit levels
โข Supports all major futures contracts: ES, NQ, GC, RTY, YM, MNQ, MES with accurate contract specifications
โข Customizable risk amount (defaults to $500 but fully adjustable)
โข Real-time position size calculations that never exceed your risk tolerance
โข Visual risk validation with color-coded header (green = valid risk, red = excessive risk)
โข Automatic 2:1 risk/reward ratio calculations
โข Compact, non-intrusive table display in top-right corner
โข Clean interface with no chart clutter
How to Use:
Select your futures instrument from the dropdown
Set your maximum risk amount (default $500)
Click on the chart to set your Entry Price
Click on the chart to set your Stop Loss Price
Optionally click to set your Take Profit Price
The calculator instantly shows maximum contracts, actual risk, expected profit, and R/R ratio
Risk Management:
The indicator enforces strict risk management by calculating the maximum number of contracts you can trade while staying within your specified risk limit. The header turns green when your trade is within acceptable risk parameters and red when the risk is too high, providing instant visual feedback.
Perfect for day traders, swing traders, and anyone trading futures who wants to maintain consistent position sizing and risk management discipline.
Trend Blend
Trend blend is my new indicator. I use it to identify my bias when trading and filter out fake setups that are going in the wrong direction.
Trend blend utilises the 9 EMA (Red), 21 EMA (Black), and if you trade futures or Bitcoin, you can also use the VWAP (Blue).
There is also a table at the top right that displays the chart time frame bias
I prefer to use the 1-hour time frame for bias and execute the trades on 5-minute charts, mainly, and sometimes on the 1-minute for a smaller stoploss.
Here's an example of the trade I took during the London session on XAU/USD
1 hour bias was Bearish
Price broke out of the range
I waited for the London session to open, where I ended up taking a short on the 5-minute time frame as we broke out of the pre-London range
Entry was at the Fair Value Gap (5-minute bias was also Bearish as price traded into the FVG)
Stoploss was at the last high
Take Profit was the next major support level
Another set that I like to trade with the Trend blend is when price is trending bullish and price trades inside the 9 and 21 EMA, and there is a bullish candle closer above the 9 EMA with Stoploss below the low of the bullish candle and Take profit between 1-2 Risk to Reward
Same when there's a bearish trend, I wait for price to trade inside the 9 and 21 EMA, and I'll take sells when a bearish candle closes below the 9 EMA.
This setup works best in strong trends, or it can be used to enter a trade on a pullback or to scale into an existing trade.
Trend Flow Trail [AlgoAlpha]OVERVIEW
This script overlays a custom hybrid indicator called the Money Flow Trail which combines a volatility-based trend-following trail with a volume-weighted momentum oscillator. Itโs built around two core components: the AlphaTrailโa dynamic band system influenced by Hull MA and volatilityโand a smoothed Money Flow Index (MFI) that provides insights into buying or selling pressure. Together, these tools are used to color bars, generate potential reversal markers, and assist traders in identifying trend continuation or exhaustion phases in any market or timeframe.
CONCEPTS
The AlphaTrail calculates a volatility-adjusted channel around price using the Hull Moving Average as the base and an EMA of range as the spread. It adaptively shifts based on price interaction to capture trend reversals while avoiding whipsaws. The direction (bullish or bearish) determines both the band being tracked and how the trail locks in. The Money Flow Index (MFI) is derived from hlc3 and volume, measuring buying vs selling pressure, and is further smoothed with a short Hull MA to reduce noise while preserving structure. These two systems work in tandem: AlphaTrail governs directional context, while MFI refines the timing.
FEATURES
Dynamic AlphaTrail line with regime switching logic that controls directional bias and bar coloring.
Smoothed MFI with gradient coloring to visually communicate pressure and exhaustion levels.
Overbought/oversold thresholds (80/20), mid-level (50), and custom extreme zones (90/10) for deeper signal granularity.
Built-in take-profit signal logic: crossover of MFI into overbought with bullish AlphaTrail, or into oversold with bearish AlphaTrail.
Visual fills between price and AlphaTrail for clearer confirmation during trend phases.
Alerts for regime shifts, MFI crossovers, trail interactions, and bar color regime changes.
USAGE
Add the indicator to any chart. Use the AlphaTrail plot to define trend context: bullish (trailing below price) or bearish (trailing above). MFI values give supporting confirmationโfavor long setups when MFI is rising and above 50 in a bullish regime, and shorts when MFI is falling and below 50 in a bearish regime. The colored fills help visually track strength; sharp changes in MFI crossing 80/20 or 90/10 zones often precede pullbacks or reversals. Use the plotted circles as optional take-profit signals when MFI and trend are extended. Adjust AlphaTrail length/multiplier and MFI smoothing to better match the assetโs volatility profile.
BackTestLibLibrary "BackTestLib"
Allows backtesting indicator performance. Tracks typical metrics such as won/loss, profit factor, draw down, etc. Trading View strategy library provides similar (and more comprehensive)
functionality but only works with strategies. This libary was created to address performance tracking within indicators.
Two primary outputs are generated:
1. Summary Table: Displays overall performance metrics for the indicator over the chart's loaded timeframe and history
2. Details Table: Displays a table of individual trade entries and exits. This table can grow larger than the available chart space. It does have a max number of rows supported. I haven't
found a way to add scroll bars or scroll bar equivalents yet.
f_init(data, _defaultStopLoss, _defaultTakeProfit, _useTrailingStop, _useTraingStopToBreakEven, _trailingStopActivation, _trailingStopOffset)
โโf_init Initialize the backtest data type. Called prior to using the backtester functions
โโParameters:
โโโโ data (backtesterData) : backtesterData to initialize
โโโโ _defaultStopLoss (float) : Default trade stop loss to apply
โโโโ _defaultTakeProfit (float) : Default trade take profit to apply
โโโโ _useTrailingStop (bool) : Trailing stop enabled
โโโโ _useTraingStopToBreakEven (bool) : When trailing stop active, trailing stop will increase no further than the entry price
โโโโ _trailingStopActivation (int) : When trailing stop active, trailing will begin once price exceeds base stop loss by this number of points
โโโโ _trailingStopOffset (int) : When trailing stop active, it will trail the max price achieved by this number of points
โโReturns: Initialized data set
f_buildResultStr(_resultType, _price, _resultPoints, _numWins, _pointsWon, _numLoss, _pointsLost)
โโf_buildResultStr Helper function to construct a string of resutling data for exit tooltip labels
โโParameters:
โโโโ _resultType (string)
โโโโ _price (float)
โโโโ _resultPoints (float)
โโโโ _numWins (int)
โโโโ _pointsWon (float)
โโโโ _numLoss (int)
โโโโ _pointsLost (float)
f_buildResultLabel(data, labelVertical, labelOffset, long)
โโf_buildResultLabel Helper function to construct an Exit label for display on the chart
โโParameters:
โโโโ data (backtesterData)
โโโโ labelVertical (bool)
โโโโ labelOffset (int)
โโโโ long (bool)
f_updateTrailingStop(_entryPrice, _curPrice, _sl, _tp, trailingStopActivationInput, trailingStopOffsetInput, useTrailingStopToBreakEven)
โโf_updateTrailingStop Helper function to advance the trailing stop as price action dictates
โโParameters:
โโโโ _entryPrice (float)
โโโโ _curPrice (float)
โโโโ _sl (float)
โโโโ _tp (float)
โโโโ trailingStopActivationInput (float)
โโโโ trailingStopOffsetInput (float)
โโโโ useTrailingStopToBreakEven (bool)
โโReturns: Updated stop loss for current price action
f_enterShort(data, entryPrice, fixedStopLoss)
โโf_enterShort Helper function to enter a short and collect data necessary for tracking the trade entry
โโParameters:
โโโโ data (backtesterData)
โโโโ entryPrice (float)
โโโโ fixedStopLoss (float)
โโReturns: Updated backtest data
f_enterLong(data, entryPrice, fixedStopLoss)
โโf_enterLong Helper function to enter a long and collect data necessary for tracking the trade entry
โโParameters:
โโโโ data (backtesterData)
โโโโ entryPrice (float)
โโโโ fixedStopLoss (float)
โโReturns: Updated backtest data
f_exitTrade(data)
โโf_enterLong Helper function to exit a trade and update/reset tracking data
โโParameters:
โโโโ data (backtesterData)
โโReturns: Updated backtest data
f_checkTradeConditionForExit(data, condition, curPrice, enableRealTime)
โโf_checkTradeConditionForExit Helper function to determine if provided condition indicates an exit
โโParameters:
โโโโ data (backtesterData)
โโโโ condition (bool) : When true trade will exit
โโโโ curPrice (float)
โโโโ enableRealTime (bool) : When true trade will evaluate if barstate is relatime or barstate is confirmed; otherwise just checks on is confirmed
โโReturns: Updated backtest data
f_checkTrade(data, curPrice, curLow, curHigh, enableRealTime)
โโf_checkTrade Helper function to determine if current price action dictates stop loss or take profit exit
โโParameters:
โโโโ data (backtesterData)
โโโโ curPrice (float)
โโโโ curLow (float)
โโโโ curHigh (float)
โโโโ enableRealTime (bool) : When true trade will evaluate if barstate is relatime or barstate is confirmed; otherwise just checks on is confirmed
โโReturns: Updated backtest data
f_fillCell(_table, _column, _row, _title, _value, _bgcolor, _txtcolor, _text_size)
โโf_fillCell Helper function to construct result table cells
โโParameters:
โโโโ _table (table)
โโโโ _column (int)
โโโโ _row (int)
โโโโ _title (string)
โโโโ _value (string)
โโโโ _bgcolor (color)
โโโโ _txtcolor (color)
โโโโ _text_size (string)
โโReturns: Table cell
f_prepareStatsTable(data, drawTesterSummary, drawTesterDetails, summaryTableTextSize, detailsTableTextSize, displayRowZero, summaryTableLocation, detailsTableLocation)
โโf_fillCell Helper function to populate result table
โโParameters:
โโโโ data (backtesterData)
โโโโ drawTesterSummary (bool)
โโโโ drawTesterDetails (bool)
โโโโ summaryTableTextSize (string)
โโโโ detailsTableTextSize (string)
โโโโ displayRowZero (bool)
โโโโ summaryTableLocation (string)
โโโโ detailsTableLocation (string)
โโReturns: Updated backtest data
backtesterData
โโbacktesterData - container for backtest performance metrics
โโFields:
โโโโ tradesArray (array) : Array of strings with entries for each individual trade and its results
โโโโ pointsBalance (series float) : Running sum of backtest points won/loss results
โโโโ drawDown (series float) : Running sum of backtest total draw down points
โโโโ maxDrawDown (series float) : Running sum of backtest total draw down points
โโโโ maxRunup (series float) : Running sum of max points won over the backtest
โโโโ numWins (series int) : Number of wins of current backtes set
โโโโ numLoss (series int) : Number of losses of current backtes set
โโโโ pointsWon (series float) : Running sum of points won to date
โโโโ pointsLost (series float) : Running sum of points lost to date
โโโโ entrySide (series string) : Current entry long/short
โโโโ tradeActive (series bool) : Indicates if a trade is currently active
โโโโ tradeComplete (series bool) : Indicates if a trade just exited (due to stop loss or take profit)
โโโโ entryPrice (series float) : Current trade entry price
โโโโ entryTime (series int) : Current trade entry time
โโโโ sl (series float) : Current trade stop loss
โโโโ tp (series float) : Current trade take profit
โโโโ defaultStopLoss (series float) : Default trade stop loss to apply
โโโโ defaultTakeProfit (series float) : Default trade take profit to apply
โโโโ useTrailingStop (series bool) : Trailing stop enabled
โโโโ useTrailingStopToBreakEven (series bool) : When trailing stop active, trailing stop will increase no further than the entry price
โโโโ trailingStopActivation (series int) : When trailing stop active, trailing will begin once price exceeds base stop loss by this number of points
โโโโ trailingStopOffset (series int) : When trailing stop active, it will trail the max price achieved by this number of points
โโโโ resultType (series string) : Current trade won/lost
โโโโ exitPrice (series float) : Current trade exit price
โโโโ resultPoints (series float) : Current trade points won/lost
โโโโ summaryTable (series table) : Table to deisplay summary info
โโโโ tradesTable (series table) : Table to display per trade info
EMA Pullback System 1:5 RRR [SL]EMA Trend Pullback System (1:5 RRR)
Summary:
This indicator is designed to identify high-probability pullback opportunities along the main trend, providing trade signals that target a high 1:5 Risk/Reward Ratio. It is a trend-following strategy built for patient traders who wait for optimal setups.
Strategy Logic:
The system is based on three Exponential Moving Averages (EMAs): 21, 50, and 200.
BUY Signal:
Trend (Uptrend): The price must be above the 200 EMA.
Pullback: The price must pull back into the "Dynamic Support Zone" between the 21 EMA and 50 EMA.
Confirmation: A strong Bullish Confirmation Candle (e.g., Bullish Engulfing) must form within this zone.
SELL Signal:
Trend (Downtrend): The price must be below the 200 EMA.
Pullback: The price must rally back into the "Dynamic Resistance Zone" between the 21 EMA and 50 EMA.
Confirmation: A strong Bearish Confirmation Candle (e.g., Bearish Engulfing) must form within this zone.
Key Features:
Clearly plots the 21, 50, and 200 EMAs on the chart.
Displays BUY and SELL labels when the rules are met.
Automatically calculates and plots Stop Loss (SL) and Take Profit (TP) levels for each signal.
The Risk/Reward Ratio for the Take Profit level is customizable in the settings (Default: 1:5).
How to Use:
Best suited for higher timeframes like H1 and H4.
It is crucial to wait for the signal candle to close before considering an entry.
While this is an automated tool, for best results, combine its signals with your own analysis of Price Action and Market Structure.
Disclaimer:
This is an educational tool and not financial advice. Trading involves substantial risk. Always use proper risk management. It is essential to backtest any strategy before deploying it with real capital.
HoLo (Highest Open Lowest Open)HoLo (Highest Open Lowest Open) Method
Overview
HoLo stands for "Highest Open Lowest Open" โ a forex trading strategy.
Core Concept
Definition of HoLo:
Highest Open (HO): The highest opening price among all H1 candles of the current trading day
Lowest Open (LO): The lowest opening price among all H1 candles of the current trading day
Trading Day: Starts at Asia Open Session
Strategy Setup
Step 1: Mark Key Levels
Current day's High/Low
Highest Open and Lowest Open (from H1 candles)
Step 2: Define the Area of Interest
Sell Zone: Between the Highest Open and the current day's High
Buy Zone: Between the Lowest Open and the current day's Low
Trade Entry Rules
Sell Trade:
Price goes above the Highest Open
Trigger candle (M5, M15, or M30) closes above the Highest Open
Enter a sell when price revisits the Highest Open level (Sell Stop Order)
Buy Trade:
Price drops below the Lowest Open
Trigger candle closes below the Lowest Open
Enter a buy when price revisits the Lowest Open level (Buy Stop Order)
Trigger Timeframe:
Choose M1, M5, or M15 based on:
Your screen time availability
Personal trading style
Risk and Profit Management
Stop Loss:
For sell: Set SL at the dayโs High + spread
For buy: Set SL at the dayโs Low + spread
Take Profit (TP) Basic Rule:
You should open 2 positions:
When profit reaches 1R: Take partial profit + move SL to BE (Break Even)
Let the remaining position run using partial TP or trailing stop
Money Management:
Never risk more than 1% per trade
Recommended: 0.5% risk due to multiple opportunities daily
Prioritize major pairs.
The Indicator
How to read data
For Day Traders
Monitor the sell zone (red area) for potential short entries near resistance
Watch the buy zone (blue area) for potential long entries near support
Use cross signals for entry/exit points
Pay attention to timing markers for key market hours
Alert
HO (Highest Open) level changes
LO (Lowest Close) level changes
Price crossing key levels
Timing notifications
Supply/Demand Zones + Engulfment-based ExecutionSupply/Demand Zones + Engulfment-Based Execution
Strategy Overview
This strategy combines institutional trading conceptsโsupply/demand zones and engulfing candle patternsโto generate high-probability long and short trade setups. The system uses aggregated price action to identify potential reversal zones and confirms entries with engulfing candle patterns, ensuring trades are only taken when market structure shows commitment in the direction of the trade.
Core Concepts
โข Supply & Demand Zones: These are automatically detected by analyzing aggregated bullish and bearish candle structures over user-defined intervals. Supply zones are formed after bearish continuation patterns; demand zones appear after bullish continuation patterns.
โข Engulfing Entries: Once price enters a zone, the strategy waits for a bullish engulfing pattern (in a demand zone) or a bearish engulfing pattern (in a supply zone) before executing a trade. This adds confirmation and reduces false signals.
โข Risk Management: Stop-loss is placed at the low (for long trades) or high (for short trades) of the engulfed candle. Take-profit can be calculated using a fixed R-multiple (risk-to-reward ratio) or a user-defined target price.
Key Features
Fully customizable aggregation factor for zone detection
Visual zone boxes, entry/SL/TP boxes, and engulfing pattern labels
Optional removal of mitigated zones for cleaner charting
Configurable trade mode (Long only, Short only, or Both)
Support for trading sessions and date filtering
Alerts for price entering supply or demand zones
How to Use
Select Aggregation Factor: Choose how many candles to group together for identifying key zones (e.g., 4x timeframe).
Enable Zones: Turn on supply and/or demand zones as needed.
Set Execution Parameters:
โ Choose R-multiple (e.g., 2:1 risk-reward)
โ Or use a fixed take-profit price
Define Trade Time Window:
โ Set the date and time ranges to restrict execution
โ Use Start Hour and End Hour to limit trades to specific sessions (e.g., London/New York)
Run on Desired Timeframe: Typically used on 15mโ4H charts, depending on your strategy and the assetโs volatility.
Ideal For
โข Traders using Smart Money Concepts (SMC)
โข Those who value high-confluence entries
โข Intraday to swing traders looking for structure-based automation
โ ๏ธ Important Notes
โข The strategy requires engulfing confirmation within the zone to enter a position.
โข This script does not repaint and executes trades on a bar close basis.
โข Backtest results may vary based on session filters and aggregation factor.
ยฉ Attribution
This strategy was developed by The_Forex_Steward and is licensed under the Mozilla Public License 2.0.
You are free to use, modify, and distribute it under the terms of that license.
Consolidation Range with Signals (Zeiierman)โ Overview
Consolidation Range with Signals (Zeiierman) is a precision tool for identifying and trading market consolidation zones, where price contracts into tight ranges before significant movement. It provides dynamic range detection using either ADX-based trend strength or volatility compression metrics, and offers built-in take profit and stop loss signals based on breakout dynamics.
Whether you trade breakouts, range reversals, or trend continuation setups, this indicator visualizes the balance between supply and demand with clearly defined mid-bands, breakout zones, and momentum-sensitive TP/SL placements.
โ How It Works
โช Multi-Method Range Detection
ADX Mode
Uses the Average Directional Index (ADX) to detect low-trend-strength environments. When ADX is below your selected threshold, price is considered to be in consolidation.
Volatility Mode
This mode detects consolidation by identifying periods of volatility compression. It evaluates whether the following metrics are simultaneously below their respective historical rolling averages:
Standard Deviation
Variance
Average True Range (ATR)
โช Dynamic Range Band System
Once a range is confirmed, the system builds a dynamic band structure using a volatility-based filter and price-jump logic:
Middle Line (Trend Filter): Reacts to price imbalance using adaptive jump logic.
Upper & Lower Bands: Calculated by expanding from the middle line using a configurable multiplier.
This creates a clean, visual box that reflects current consolidation conditions and adapts as price fluctuates within or escapes the zone.
โช SL/TP Signal Engine
On detection of a breakout from the range, the indicator generates up to 3 Take Profit levels and one Stop Loss, based on the breakout direction:
All TP/SL levels are calculated using the filtered base range and multipliers.
Cooldown logic ensures signals are not spammed bar-to-bar.
Entries are visualized with colored lines and labeled levels.
This feature is ideal for traders who want automated risk and reward reference points for range breakout plays.
โ How to Use
โช Breakout Traders
Use the SL/TP signals when the price breaks above or below the range bands, especially after extended sideways movement. You can customize how far TP1, TP2, and TP3 sit from the entry using your own risk/reward profile.
โช Mean Reversion Traders
Use the bands to locate high-probability reversion zones. These serve as reference zones for scalping or fade entries within stable consolidation phases.
โ Settings
Range Detection Method โ Choose between ADX or Volatility compression to define range criteria.
Range Period โ Determines how many bars are used to compute trend/volatility.
Range Multiplier โ Scales the width of the consolidation zone.
SL/TP System โ Optional levels that project TP1/TP2/TP3 and SL from the base price using multipliers.
Cooldown โ Prevents repeated SL/TP signals from triggering too frequently.
ADX Threshold & Smoothing โ Adjusts sensitivity of trend strength detection.
StdDev / Variance / ATR Multipliers โ Fine-tune compression detection logic.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Volatility Bias ModelVolatility Bias Model
Overview
Volatility Bias Model is a purely mathematical, non-indicator-based trading system that detects directional probability shifts during high volatility market phases. Rather than relying on classic tools like RSI or moving averages, this strategy uses raw price behavior and clustering logic to determine potential breakout direction based on recent market bias.
How It Works
Over a defined lookback window (default 10 bars), the strategy counts how many candles closed in the same direction (i.e., bullish or bearish).
Simultaneously, it calculates the price range during that window.
If volatility is above a minimum threshold and a clear directional bias is detected (e.g., >60% of closes are bullish), a trade is opened in the direction of that bias.
This approach assumes that when high volatility is coupled with directional closing consistency, the market is probabilistically more likely to continue in that direction.
ATR-based stop-loss and take-profit levels are applied, and trades auto-exit after 20 bars if targets are not hit.
Key Features
- 100% non-indicator-based logic
- Statistically-driven directional bias detection
- Works across all timeframes (1H, 4H, 1D)
- ATR-based risk management
- No pyramiding, slippage and commissions included
- Compatible with real-world backtesting conditions
Realism & Assumptions
To make this strategy more aligned with actual trading environments, it includes 0.05% commission per trade and a 1-point slippage on every entry and exit.
Additionally, position sizing is set at 10% of a $10,000 starting capital, and no pyramiding is allowed.
These assumptions help avoid unrealistic backtest results and make the performance metrics more representative of live conditions.
Parameter Explanation
Bias Window (10 bars): Number of past candles used to evaluate directional closings
Bias Threshold (0.60): Required ratio of same-direction candles to consider a bias valid
Minimum Range (1.5%): Ensures the market is volatile enough to avoid noise
ATR Length (14): Used to dynamically define stop-loss and target zones
Risk-Reward Ratio (2.0): Take-profit is set at twice the stop-loss distance
Max Holding Bars (20): Trades are closed automatically after 20 bars to prevent stagnation
Originality Note
Unlike common strategies based on oscillators or moving averages, this script is built on pure statistical inference. It models the market as a probabilistic process and identifies directional intent based on historical closing behavior, filtered by volatility. This makes it a non-linear, adaptive model grounded in real-world price structure โ not traditional technical indicators.
Disclaimer
This strategy is for educational and experimental purposes only. It does not constitute financial advice. Always perform your own analysis and test thoroughly before applying with real capital.